package com.rdgzs.authority.servlet;




import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* ###################################################
* 创建日期：2012-12-27 22:58:45
* 开发人员：李广彬
* 功能描述：生成验证码图片和相应的随机数 回写到前台
* 修改日志： 
* ###################################################
*/
public class LogoutServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	private final static String LOGIN_VIEW="loginView";
	private final static String LOGIN_DEFAULT_VIEW="loginView";
	private String loginView=LOGIN_DEFAULT_VIEW;
	private RequestDispatcher dispatcher;

	protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
		String loginPage=this.getInitParameter(LOGIN_VIEW);
		if(loginPage!=null&&loginPage.trim().length()>0){
			loginView=loginPage;
		}
		dispatcher=req.getRequestDispatcher(loginView);
		dispatcher.forward(req, res);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request, response);
	}

	public void init(ServletConfig config) throws ServletException {
		super.init(config);
		String email = config.getInitParameter("loginView");
		String name = config.getInitParameter("name");
	}
}